package dormouse.vfs.ui.renderers;

import org.apache.commons.vfs2.FileObject;

/**
 * This factory is responsible for creating icons (or buttons, or any similar
 * component) based on the file object.
 * 
 * @param <C>
 *            the component type used to render file icons.
 */
public interface IFileIconFactory<C> {
	
	/**
	 * Most files have a recognizable file extension that the factory uses to select an icon.
	 * In the event that the file extension is not recognized, use the DEFAULT key to get
	 * the default file icon from the internal icon map.
	 */
	final String DEFAULT="DEFAULT";

	/**
	 * This method gets a file icon based on the type of file.
	 * 
	 * @param file
	 *            the file used to determine the icon type.
	 * @return
	 */
	C getFileIcon(FileObject file);

	/**
	 * Gets a list of file extensions supported by the icon factory.
	 * @return an array of supported file extensions
	 */
	String[] getExtensions();

}
